// src/api/constantitem.js
import service from '@/utils/request';

// 获取常数项列表
export const getConstantItemList = () => {
  return service.get('/api/constantitem/list');
};
// 新增常数项
export const addConstantItem = (data) => {
  return service.post('/api/constantitem', data);
};

// 更新常数项
export const updateConstantItem = (data) => {
  return service.put('/api/constantitem', data);
};

// 删除常数项
export const deleteConstantItem = (id) => {
  return service.delete(`/api/constantitem/${id}`);
};

// 根据常数项编码查询常数项
export const getConstantItemByCode = (code) => {
  return service.get(`/api/constantitem/byCode/${code}`);
};